rational canonical form of matrices